/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package control;

import dao.UserDao;
import entity.User;
import org.primefaces.model.UploadedFile;

/**
 *
 * @author AnBoCa
 */
public class RegisterUser {

    private String name;
    private String userName;
    private String email;
    private String pass1;
    private String pass2;
    private String photoPath;
    private UploadedFile photo;
    
    public RegisterUser(){
    }
    
    public void registerUser(){
        UserDao userDao=new UserDao();
        User user=new User();
        user.setEmail(email);
        user.setName(name);
        user.setPassword(pass1);
        user.setUserName(userName);
        userDao.insert(user);
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getPhotoPath() {
        return photoPath;
    }

    public void setPhotoPath(String photoPath) {
        this.photoPath = photoPath;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getPass1() {
        return pass1;
    }

    public void setPass1(String pass1) {
        this.pass1 = pass1;
    }

    public String getPass2() {
        return pass2;
    }

    public void setPass2(String pass2) {
        this.pass2 = pass2;
    }

    public UploadedFile getPhoto() {
        return photo;
    }

    public void setPhoto(UploadedFile photo) {
        this.photo = photo;
    }
    
}
